package com.design.xiangyuan;

import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import lombok.extern.slf4j.Slf4j;

/**
 * @author ytj
 * @date 2024/11/28 10:36
 */
@Slf4j
public class ActivityControlller {
    private RedisUtil redisUtil=new RedisUtil();

    public Activity queryActivityInfo(String id){
        ActivityFactory activityFactory=new ActivityFactory();
        Activity activity = activityFactory.getActivityById(id);
        Stock stock=new Stock(1000, redisUtil.getUsed());
        activity.setStock(stock);
        return activity;
    }
}
